# -*- coding: utf-8 -*-
'''
查看帮助 dir()    help()

from PyQt5.QtWidgets import QWidget
dir(QWidget)
'''

import sys
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton 
from PyQt5.QtCore import QCoreApplication

if __name__ == '__main__':

    app = QApplication(sys.argv)    
    btn = QPushButton("Hello PyQt5")
    btn.clicked.connect(QCoreApplication.instance().quit)
    btn.resize(400,100)
    btn.move(50,50)
    btn.show()

    sys.exit(app.exec_())

'''
pyqt5模块文档
https://www.riverbankcomputing.com/static/Docs/PyQt5/module_index.html
python模块文档：本地计算机就有python3.9 manual

sys.argv：获取命令行参数
sys.exit：退出python

QtWidgets提供UI elements：QApplication、QWidget、QPushButton 
QtCore提供核心类：QCoreApplication
app.exec_：
'''